package web.common.core.io;

import java.io.InputStream;

/**
 * @author Jin Zheng
 * @since 1.0 2021-11-15
 */
public interface StorageService {

    FileMetadata save(String path, InputStream is) throws StorageException;

    void copy(String srcPath, String destPath) throws StorageException;

    void move(String srcPath, String destPath) throws StorageException;

    void remove(String path) throws StorageException;

    InputStream read(String path) throws StorageException;

    boolean exists(String path) throws StorageException;

    FileMetadata writeString(String path, String content) throws StorageException;

}
